date_add for mysql correction

ms32035 vor 10 Jahren
Ursprung
Commit
3d33881897
1 geänderte Dateien mit 1 neuen Zeilen und 1 gelöschten Zeilen
  1. 1 1
      lib/rdbms_functions.rb

+ 1 - 1
lib/rdbms_functions.rb

@@ -3,7 +3,7 @@ module RDBMSFunctions
3 3
     adapter_type = connection.adapter_name.downcase.to_sym
4 4
     case adapter_type
5 5
       when :mysql
6
-        "DATE_ADD(`#{source}`, INTERVAL #{unit} #{AMOUNT})"
6
+        "DATE_ADD(`#{source}`, INTERVAL #{amount} #{unit})"
7 7
       when :postgresql    
8 8
         "(#{source} + INTERVAL '#{amount} #{unit}')"
9 9
       else